package com.blog.service;

import com.blog.pojo.PageBean;
import com.blog.pojo.ResultResponse;
import com.blog.pojo.User;
import com.blog.pojo.UserInfoVO;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;

@Service
public interface UserService {
    UserInfoVO login(User user);

    ResultResponse register(User user);

    UserInfoVO getCurrentUser();

    UserInfoVO getUserById(Integer id);

    void freezeUser(Integer id);

    void revertUser(Integer id);

    String updateUser(String username, MultipartFile image) throws IOException;

    ResultResponse updatePassword(String oldPassword, String newPassword);

    PageBean listUsers(Integer page, Integer pageSize);

    PageBean listUsersByCondition(Integer page, Integer pageSize, String condition);

    void changePassword(String email, String newPassword);
}
